package Test_0813;

import java.util.Comparator;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-08-13
 * Time: 20:53
 */
public class AgeComparator implements Comparator<Student> {
    @Override
    public int compare(Student o1, Student o2) {

        return o1.age-o2.age;//o1的age-o2的0ge : stu1 16 - stu2 20 = 16-20 = -4
    }
}
